home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / nwtp06 / xpmail.pas < prev   
Pascal/Delphi Source File  |  1996-07-10  |  597b  |  21 lines

  1. {$X+,B-,V-} {essential compiler directives}
  2.  
  3. Program xpmail;
  4.  
  5. { Example program for the pmail unit / NwTP 0.6 API. (c) 1993,1994, R.Spronk }
  6.  
  7. uses nwMisc,nwBindry,pmail;
  8.  
  9. CONST MsgBodyTXTfile='a:testmsg.txt';
  10.  
  11. { Simple program illustrating the use of the SendMailFile call. }
  12. begin
  13. IF NOT PmailInstalled
  14.  then begin
  15.       writeln('PMail not installed on the current server.');
  16.       halt(1);
  17.       end;
  18. IF NOT SendMailFile('SUPERVISOR',OT_USER,
  19.                     'testmessage',MsgBodyTXTfile)
  20.    then writeln('Error sending file as mail. err# :',HexStr(pmail.result,4));
  21. end.